package com.zhuang.visitor.double_dispatch;

/**
 * @Classname Execute
 * @Description 双分派
 * @Date 2021/3/27 17:13
 * @Created by dell
 */

public class Execute {
    public void execute(Animal a) {
        System.out.println("Animal");
    }

    public void execute(Dog dog) {
        System.out.println("我是狗...");
    }

    public void execute(Cat cat) {
        System.out.println("我是猫...");
    }
}
